package com.assignwork.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

/**
 * 二级配工(AssignWork)实体类
 * @since 2024-01-31 09:49:00
 */
@Data
@TableName("assign_work")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "AssignWork对象", description = "二级配工")
public class AssignWork extends BaseEntity  {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "作业线ID")
    private Long lineId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "昼夜计划ID")
    private Long planId;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long shipId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "配工ID")
    private Long arrangeId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "作业区域ID")
    private Long workAreaId;

    @ApiModelProperty(value = "作业类型")
    private String workType;

    private String shiftKey;

    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    private LocalDate planDate;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "所属单位")
    private Long belongToId;

    private String belongToName;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "队")
    private Long teamId;

    private String teamName;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "组")
    private Long groupId;

    private String groupName;

    @ApiModelProperty(value = "在册人员")
    private Integer payrollNumber;

    @ApiModelProperty(value = "出勤人数")
    private Integer attendanceNumber;

    @ApiModelProperty(value = "缺勤人数")
    private Integer absenteeismNumber;

    @ApiModelProperty(value = "实际配工人数")
    private Integer workerNumber;

    private String timeSpace;
}

